<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template/user.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">

    <ui:define name="header">
    </ui:define>

    <ui:define name="context">
        <h:graphicImage library="user/images/avatar" name="#{u_memberDetailManagedBean.Get_Avatar()}" width="88" 
                        height="96"/>
        <h:commandButton value="Remove Friend" action="#{u_memberDetailManagedBean.Friend_Action(1)}" rendered="#{u_memberDetailManagedBean.Get_FriendStatus() == 1}"/>
        <h:commandButton value="Remove Friend Request" action="#{u_memberDetailManagedBean.Friend_Action(2)}" rendered="#{u_memberDetailManagedBean.Get_FriendStatus() == 2}"/>
        <h:commandButton value="Accept Friend Request" action="#{u_memberDetailManagedBean.Friend_Action(3)}" rendered="#{u_memberDetailManagedBean.Get_FriendStatus() == 3}"/>
        <h:commandButton value="Decline Friend Request" action="#{u_memberDetailManagedBean.Friend_Action(4)}" rendered="#{u_memberDetailManagedBean.Get_FriendStatus() == 3}"/>
        <h:commandButton value="Request Friend" action="#{u_memberDetailManagedBean.Friend_Action(5)}" rendered="#{u_memberDetailManagedBean.Get_FriendStatus() == 4}"/>
        <br/>

        <p:panelGrid columns="2">
            <h:outputText value="ID:" />  
            <h:outputText value="#{u_memberDetailManagedBean.member.id}"/>

            <h:outputText value="Username:" />  
            <h:outputText value="#{u_memberDetailManagedBean.member.username}"/>

            <h:outputText value="Full Name:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.fullName}"/>

            <h:outputText value="Nick Name:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.nickName}"/>

            <h:outputText value="Email:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.email}"/>

            <h:outputText value="Height:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.height}"/>

            <h:outputText value="Contact Number:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.contactNumber}"/>

            <h:outputText value="Working At:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.workingAt}"/>

            <h:outputText value="Family:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.family}"/>

            <h:outputText value="Address:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.address}"/>

            <h:outputText value="Hobbies:" />
            <h:outputText value="#{u_memberDetailManagedBean.member.hobbies}"/>

            <h:outputLabel value="Birthday:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.birthday}">
                <f:convertDateTime pattern="dd/MM/yyyy"/>
            </h:outputText>

            <h:outputText value="Martial Status:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDMarital.maritalStatus}"/>

            <h:outputText value="Country:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDState.IDCountry.country}"/>

            <h:outputText value="State:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDState.state}"/>

            <h:outputText value="Language:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDLanguage.language}"/>

            <h:outputText value="Religion:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDReligion.religion}"/>

            <h:outputText value="Catse:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDCasle.caste}"/>

            <h:outputText value="Role:"/>
            <h:outputText value="#{u_memberDetailManagedBean.member.IDPermission.name}"/>

        </p:panelGrid>
    </ui:define>

</ui:composition>
